package bit.pack;

public class Dog2 extends Animal{
    public Dog2(int age,String name){
        super(age, name);
        this.age = age;
        this.name = name;
    }
    public void eat(){
        System.out.println(this.name+"正在吃狗粮");
    }

    public void bark(){
        System.out.println(this.name+"正在汪汪叫");
    }

    @Override
    public String toString() {
        return "Dog2{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
